﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OpGen.Compiler
{
    /// <summary>
    /// Datentypen
    /// </summary>
    [Serializable]
    public enum TypeEnum
    {
        /// <summary>
        /// Integer
        /// </summary>
        INT,

        /// <summary>
        /// Short
        /// </summary>
        INT16,

        /// <summary>
        /// Integer
        /// </summary>
        INT32,

        /// <summary>
        /// Long
        /// </summary>
        INT64,

        /// <summary>
        /// Long
        /// </summary>
        LONG,

        /// <summary>
        /// Float / Single
        /// </summary>
        FLOAT,

        /// <summary>
        /// Double / Double
        /// </summary>
        DOUBLE,

        /// <summary>
        /// Dezimal
        /// </summary>
        DECIMAL,

        /// <summary>
        /// String
        /// </summary>
        STRING,

        /// <summary>
        /// Byte
        /// </summary>
        BYTE,

        /// <summary>
        /// Boolean
        /// </summary>
        BOOL,

        /// <summary>
        /// Char
        /// </summary>
        CHAR,

        /// <summary>
        /// DateTime
        /// </summary>
        DATETIME,

        /// <summary>
        /// Referenz
        /// </summary>
        REFERENCE,

        /// <summary>
        /// Keine Angabe
        /// </summary>
        NONE
    }

    /// <summary>
    /// Stellt die Typen Deklaration dar
    /// </summary>
    [Serializable]
    public class OpGenTypeInfo
    {
        /// <summary>
        /// Erstellt eine neue Instanz der TypeInfo-Klasse
        /// </summary>
        public OpGenTypeInfo()
        {
            this.Type = TypeEnum.NONE;
        }

        /// <summary>
        /// Liefert den Typen, oder legt ihn fest
        /// </summary>
        public TypeEnum Type { get; set; }

        /// <summary>
        /// Gibt an ob es sich um ein List Objekt handelt, oder legt ihn fest
        /// </summary>
        public bool IsList { get; set; }

        /// <summary>
        /// Liefert den Referenztype
        /// </summary>
        public OpGenElement ReferenceElement { get; set; }

        /// <summary>
        /// Liefrt den Namen des Referenztypes
        /// </summary>
        public string ReferenceName { get; set; }
    }
}
